import { createBrowserRouter,Navigate } from "react-router-dom";

import { Suspense,lazy } from "react";

const App=lazy(()=>import('../App'))
const Login=lazy(()=>import('../pages/login'))

const router = createBrowserRouter([
    {path:'/app',element:(<Suspense fallback={<div>loading...</div>}><App></App></Suspense>)},
    {path:'/login',element:(<Suspense fallback={<div>loading...</div>}><Login></Login></Suspense>)},
   
    
    {path:"/",element:<Navigate to='/login'></Navigate>}
])

export default router